package com.brillilab.service.module.message.template.impl.method;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: MemberShareMethodTemp
 * @ProjectName brill_lab
 * @Description: 成员分享方法模板
 * @date 2019/5/27 18:08
 */
@Data
public class MemberShareMethodTemp extends AbstractMessageTemplate {
    private String shareUserName;
    private String methodName;

    /**
     * 成员分享方法
     * @param labId         实验室ID
     * @param receiverId    接收人ID
     * @param labMemberId   接收者实验室成员Id
     * @param shareUserName 分享者姓名
     * @param methodName    方法名称
     * @param referId       业务关联ID
     */
    public MemberShareMethodTemp(Long labId, Long receiverId,Long labMemberId,String shareUserName, String methodName, Long referId) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.MemberShareMethod.getValue());
        super.setTitle("有成员给您分享方法");
        String content = String.format("<span style='color:#F6AC2D'>%s</span><span>分享了</span>" +
                        "<span style='color:#F6AC2D'>%s</span><span>方法给您</span>",
                shareUserName, methodName);
        super.setContent(content);
        super.setAppContent(String.format("%s分享了%s方法给您",shareUserName, methodName));
        this.labMemberId=labMemberId;
        this.shareUserName = shareUserName;
        this.methodName = methodName;
        this.referId = referId;
    }
}
